<script>
  {
    class A {
      hasSuper() {
        return false;
      }
    }
    console.assert(new A().hasSuper() === false);
  }

  {
    class A {
      hasSuper() {
        return true;
      }
    }
    class B extends A {
      hasSuper() {
        return super.hasSuper();
      }
    }
    console.assert(new B().hasSuper() === true);
  }
  {
    class A {
      hasSuper() {
        return void 0;
      }
    }
    class B extends A {
      hasSuper() {
        return super.hasSuper();
      }
    }
    console.assert(new B().hasSuper() === void 0);
  }

  {
    class A {
      iAmSuper() {
        return true;
      }
    }
    class B extends A {}
    class C extends B {
      iAmSuper() {
        return super.iAmSuper();
      }
    }
    console.assert(new C().iAmSuper() === true);
  }

  {
    class A {
      constructor() {
        return void 0;
      }
    }
    class B extends A {
      getMethod() {}
    }
    console.assert(new B().getMethod() === void 0);
  }

  {
    class A {
      constructor() {
        this.levels = 1;
      }
    }
    class B extends A {
      constructor() {
        super();
        this.levels++;
      }
    }
    console.assert(new B().levels === 2);
  }

  {
    class A {
      constructor(startValue = 1, addTo = 1) {
        this.counter = startValue + addTo;
      }
    }
    class B extends A {
      constructor(...args) {
        super(...args);
        this.counter++;
      }
    }
    console.assert(new B(42, 2).counter === 45);
  }

  {
    class A {
      inc() {
        this.countUp = 1;
      }
    }
    class B extends A {
      inc() {
        super.inc();
        this.countUp = 1;

        return this.countUp;
      }
    }
    console.assert(new B().inc() === 1);
  }

  {
    class ParentClassA {
      constructor() {
        return "parent";
      }
      konstructer() {
        return "ParentClassA";
      }
    }
    class B extends ParentClassA {
      constructor() {
        super();
        this.isTop = "" + super.konstructer;
      }
    }
    console.assert(new B().isTop.includes("ParentClassA"));
  }
</script>
